<?php 

$files = glob("./upload/*");

 ?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<table border="1">
		<tr>
			<td>文件名</td>
			<td>大小</td>
			<td>时间</td>
			<td>操作</td>
		</tr>
		<?php foreach ($files as $file): ?>
		<tr>
			<td><?php echo basename($file); ?></td>
			<td><?php echo filesize($file); ?></td>
			<td><?php echo filemtime($file); ?></td>
			<td><a href="./download.php?url=<?php echo $file; ?>">下载</a></td>
		</tr>
		<?php endforeach ?>
	</table>
</body>
</html>